<template>
  <div>
    全局组件3
    <!-- {{ c }} -->
    <!-- <slot></slot> 接收默认插槽 -->
    <!-- <slot></slot> -->
    <!-- 给插槽取个名字用名字来接收 -->
    <!-- <slot name="name1"></slot>
    <slot name="name3"> </slot> -->
    <slot :data1="data1"></slot>
  </div>
</template>
<script>
import bus from "@/js/bus";
export default {
  data() {
    return {
     
      data1: [
        { id: "1", name: "张三" },
        { id: "2", name: "陈家旺" },
      ],
    };
  },
  created() {},
  mounted() {
    bus.$on("sc", (vus) => {
      this.c = vus;
    });
  },
  computed: {},
  methods: {},
};
</script>
<style scoped>
</style>
